﻿Public Class KasaCekListe : Inherits ProcessReport

	Dim aralik As Input

	Public Overrides Sub GenericEvent(ByVal e As ProcessEventArgs)
		Select Case e.EventType
			Case EventType.Initialize
				Text = "Banka Çek Listesi"
				InitialHelp = "Tarih aralığını girin."
				aralik = AddDateRange("Tarih", "nl", YMD(Today), YMD(Today))
			Case EventType.ValidateForm
				Rs = Kasa.Cek.Liste(Local, aralik(1).get, aralik(2).get)
				Filter.Add("Tarihe göre", "tarih", "")
				Filter.Add("Bankaya göre", "bankaadi", "")
				Filter.Add("Takas durumuna göre", "takas", "E:Takas,H:Takas değil")
				Filter.Recordset = Rs
				Buttons.Show("Reset")
				e.Result = True
			Case EventType.PageHeader
				Report.SetColumns("Tarih;Banka kodu;Banka adı;Çek no.;Çek tutarı;Takas", "2;1;4;2;1;1", "d;c;l;l;m;c", "--")
			Case EventType.ReportDetail
				For Each Row In Rs
					Report.Print(Rs("tarih"), Rs("bankakod"), Rs("bankaadi"), Rs("cekno"), Rs("cekmik"), Rs("takas"))
				Next
		End Select
	End Sub

End Class
